package cn.fufeiii.bt.demo.springretry;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author FuFei
 */
@Slf4j
@RestController
@RequestMapping("/retry")
public class RetryController {

    @Autowired
    private RetryService retryService;

    @GetMapping("/t1")
    public Object t1(Integer param) {
        return retryService.simple(param);
    }

    @GetMapping("/t2")
    public Object t2(Integer param) {
        return retryService.mp(param);
    }

    @GetMapping("/t3")
    public Object t3(Integer param) {
        return retryService.jpa(param);
    }

}
